package com.atguigu.edu.publisher.service.impl;

import com.atguigu.edu.publisher.beans.SubjectOrderAmount;
import com.atguigu.edu.publisher.beans.SubjectOrderCt;
import com.atguigu.edu.publisher.beans.SubjectUserCt;
import com.atguigu.edu.publisher.mapper.SubjectStatsMapper;
import com.atguigu.edu.publisher.service.SubjectStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubjectStatsServiceImpl implements SubjectStatsService {

    @Autowired
    private SubjectStatsMapper subjectStatsMapper;

    @Override
    public List<SubjectOrderAmount> getOrderAmount(Integer date) {
        return subjectStatsMapper.selectOrderAmount(date);
    }

    @Override
    public List<SubjectOrderCt> getOrderCt(Integer date) {
        return subjectStatsMapper.selectOrderCt(date);
    }

    @Override
    public List<SubjectUserCt> getUserCt(Integer date) {
        return subjectStatsMapper.selectUserCt(date);
    }
}
